#!/usr/bin/zsh

cd `dirname $0`/..
pygettext -p messages **/*.py
cd messages
NL=$(cat messages.pot | wc -l)
(( NL -= 17 ))
( cat pot-head.txt ; cat messages.pot | tail -n "$NL" ) > .tmp && mv .tmp messages.pot
cp messages.pot en/LC_MESSAGES/mirny.po
for f in */LC_MESSAGES/*.po ; do
	msgfmt -o "${f/.po/.mo}" "$f"
done

